<?php

namespace app\common\model;

use think\Model;


class TutorTeam extends Model
{

    

    

    // 表名
    protected $name = 'tutor_team';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';
    protected $deleteTime = false;

    // 追加属性
	protected $append = [
		'status_text'
	];
	
	const STATUS_NORMAL = 1;
	const STATUS_OVER = 2;
	
	public static $statusList = [
		self::STATUS_NORMAL => '正常',
		self::STATUS_OVER => '已解散'
	];
	
	public function getStatusTextAttr($value, $data) {
		$value = $value ? : $data['status'];
		$list = self::$statusList;
		return $list[$value] ?? '';
	}
    

    







}
